package com.ruoyi.social.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.social.mapper.SocialShopUserMapper;
import com.ruoyi.social.domain.SocialShopUser;
import com.ruoyi.social.service.ISocialShopUserService;

/**
 * 用户店铺关联Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-04
 */
@Service
public class SocialShopUserServiceImpl implements ISocialShopUserService 
{
    @Autowired
    private SocialShopUserMapper socialShopUserMapper;

    /**
     * 查询用户店铺关联
     * 
     * @param userId 用户店铺关联主键
     * @return 用户店铺关联
     */
    @Override
    public SocialShopUser selectSocialShopUserByUserId(Long userId, Long shopId)
    {
        return socialShopUserMapper.selectSocialShopUserByUserId(userId, shopId);
    }

    /**
     * 查询用户店铺关联列表
     * 
     * @param socialShopUser 用户店铺关联
     * @return 用户店铺关联
     */
    @Override
    public List<SocialShopUser> selectSocialShopUserList(SocialShopUser socialShopUser)
    {
        return socialShopUserMapper.selectSocialShopUserList(socialShopUser);
    }

    /**
     * 新增用户店铺关联
     * 
     * @param socialShopUser 用户店铺关联
     * @return 结果
     */
    @Override
    public int insertSocialShopUser(SocialShopUser socialShopUser)
    {
        return socialShopUserMapper.insertSocialShopUser(socialShopUser);
    }

    /**
     * 修改用户店铺关联
     * 
     * @param socialShopUser 用户店铺关联
     * @return 结果
     */
    @Override
    public int updateSocialShopUser(SocialShopUser socialShopUser)
    {
        return socialShopUserMapper.updateSocialShopUser(socialShopUser);
    }

    /**
     * 批量删除用户店铺关联
     * 
     * @param userIds 需要删除的用户店铺关联主键
     * @return 结果
     */
    @Override
    public int deleteSocialShopUserByUserIds(Long[] userIds)
    {
        return socialShopUserMapper.deleteSocialShopUserByUserIds(userIds);
    }

    /**
     * 删除用户店铺关联信息
     * 
     * @param userId 用户店铺关联主键
     * @return 结果
     */
    @Override
    public int deleteSocialShopUserByUserId(Long userId)
    {
        return socialShopUserMapper.deleteSocialShopUserByUserId(userId);
    }
}
